import {createRouter, createWebHistory} from 'vue-router'
import HomeView from '../views/HomeView.vue'
import LoginView from "@/views/LoginView.vue";

const routes = [
    {
        path: '/',
        name: 'home',
        component: HomeView,
        redirect:'/homeContent',
        children: [
            {
                path: '/receptionRegistration',
                component: () => import('../views/reception/ReceptionRegistrationView.vue')
            },
            {
                path: '/homeContent',
                component: () => import('../views/HomeContentView.vue')
            },
            {
                path: '/visitorRegistration',
                component: () => import('../views/visitor/VisitorRegistrationView.vue')
            },
            {
                path: '/patientInfo',
                component: () => import('../views/patient/PatientInfoView.vue')
            },
            {
                path: '/bedQuery',
                component: () => import('../views/bed/BedQueryView.vue')
            },
            {
                path: '/patientArchives',
                component: () => import('../views/patient/PatientArchivesView.vue')
            },
            {
                path: '/application',
                component: () => import('../views/application/ApplicationView.vue')
            },
            {
                path: '/bedManager',
                component: () => import('../views/bed/BedManagerView.vue')
            },
            {
                path: '/bedSetting',
                component: () => import('../views/bed/BedSettingView.vue')
            },
            {
                path: '/nothing',
                component: () => import('../views/NothingView.vue')
            },
            {
                path: '/turnBedManager',
                component: () => import('../views/bed/TurnBedManagerView.vue')
            },{
                path: '/turnRoomManager',
                component: () => import('../views/bed/TurnRoomManagerView.vue')
            },
            {
                path: '/MealsManagement',
                component: () => import('../views/meals/MealsManagement.vue')
            },
            {
                path: '/OrderingService',
                component: () => import('../views/meals/OrderingService.vue')
            },
            {
                path: '/MealsPlan',
                component: () => import('../views/meals/MealsPlan.vue')
            },
            {
                path: '/DeliveryRecord',
                component: () =>  import('../views/meals/DeliveryRecord.vue')
            },
            {
                path: '/service-pro',
                component: () => import('../views/nurse/ServiceProView.vue')
            },
            {
                path: '/nurse-grade',
                component: () => import('../views/nurse/NurseGradeView.vue')
            },
            {
                path: '/nurse-management',
                component: () => import('../views/nurse/NurseManagement.vue')
            },
            {
                path: '/nurse-report',
                component: () => import('../views/nurse/NurseReportView.vue')

            }
        ]
    },
    {path: '/login', component: () => import('../views/LoginView.vue')}
]

const router = createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes
})

export default router
